All Questions
Tagged with design-patternsc
6 questions
4votes
1answer
365views
Modular Design Patterns in C
I have created a modular design pattern which provide a single interface that can be used create instances with swapable back-end components, however I'm not entirely satisfied with it. My practical ...
3votes
2answers
103views
Print input one word per line (K&R 1-12 exercise) attempt
I'm currently trying to learn C from the K&R book, reading through and attempting the exercises. I came across exercise 1-12 yesterday and was a little stumped but managed to complete it. I was ...
5votes
3answers
5kviews
State machine implementation
I have written a simple state machine. Comments and feedback are welcome. ...
10votes
2answers
130views
Scalability of running commands from user input
Here is some code I have that has been extracted and shrunk down from a project of mine. ...
11votes
2answers
8kviews
Developing a better state pattern in C
I have created a state diagram to show the different transitions and states. I could not find many examples of the state pattern in C, so I have taken an example from a Java state pattern and tried to ...
5votes
1answer
142views
Module for making a doubly linked list
This module makes a doubly linked list and initializes each member. I couldn't do it with a loop, so I gave up and made each node individually. How can I improve it? Can somebody help me make a ...